Thunks and the λ-Calculus

نویسندگان

  • John Hatcliff
  • Olivier Danvy
چکیده

Thirty-five years ago, thunks were used to simulate call-by-name under call-by-value in Algol 60. Twenty years ago, Plotkin presented continuation-based simulations of call-by-name under call-by-value and vice versa in the λ-calculus. We connect all three of these classical simulations by factorizing the continuation-based call-by-name simulation Cn with a thunk-based call-by-name simulation T followed by the continuation-based call-by-value simulation Cv extended to thunks.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A New One-Pass Transformation into Monadic Normal Form

We present a translation from the call-by-value λ-calculus to monadic normal forms that includes short-cut boolean evaluation. The translation is higher-order, operates in one pass, duplicates no code, generates no chains of thunks, and is properly tail recursive. It makes a crucial use of symbolic computation at translation time.

متن کامل

Call-by-name linguistic side effects

We propose a typed call-by-name λ-calculus with shift, reset and strict functions and describe its linguistic applications, improving on the previous continuation-based analyses of quantification, binding, raised and in-situ wh-questions, binding in wh-questions, and superiority. The evaluation order is not fixed left-to-right: rather, it is determined by the demand for values exerted by reset ...

متن کامل

Epic - A Library for Generating Compilers

Compilers for functional languages, whether strict or nonstrict, typed or untyped, need to handle many of the same problems, for example thunks, lambda lifting, optimisation, garbage collection, and system interaction. Although implementation techniques are by now well understood, it remains difficult for a new functional language to exploit these techniques without either implementing a compil...

متن کامل

Thunks (Continued)

Call-by-name can be simulated in a call-by-value setting using \thunks" (i.e., parameterless procedures) or continuation-passing-style (CPS). In this paper we uncover a relationship between the two simulations. We prove that the call-by-value CPS transformation Cv, when applied to a term T (t) which simulates call-by-name using thunks, yields a term identical to the call-by-name CPS transformat...

متن کامل

Notes on homotopy λ-calculus

2 Homotopy λ-calculus 16 1 Type systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2 Homotopy λ-calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3 Basic layer syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4 Basic layer semantics in Top . . . . . . . . . . . . . . . . . . . . . . . . ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1993